#include "form.h"
#include "ui_form.h"

Form::Form(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Form)
{
    ui->setupUi(this);
}

Form::~Form()
{
    delete ui;
}

void Form::on_pushButton_clicked()
{
    if(ui->lineEdit->text()=="123")
    {
        Widget *w1=new Widget();
        w1->show();
        this->hide();
    }
}

void Form::on_pushButton_2_clicked()
{
    this->close();
}
